package com.gzyj.flink.driver;

import lombok.Getter;

/**
 * @author lhj
 */
@Getter
public enum ICCardStatus {
    从业资格证IC卡插入_驾驶员上班(0x01,"从业资格证 IC 卡插入（驾驶员上班）"),
    从业资格证IC卡拔出_驾驶员下班(0x02,"从业资格证 IC 卡拔出（驾驶员下班）"),
    ;

    private int code;
    private String name;

    ICCardStatus(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ICCardStatus find(int code) {
        for (ICCardStatus result : ICCardStatus.values()) {
            if (result.getCode() == code) {
                return result;
            }
        }
        return null;
    }
}
